//
//  XYResult.h
//  PeiJue
//
//  Created by lxy on 2017/12/6.
//  Copyright © 2017年 lixiya. All rights reserved.
//

#import <MWHttpUnit/MWHttpUnit.h>

@interface XYResult : NLResultUnit
@property (nonatomic, assign) enum HttpResponseCode httpResponseCode;
@property (nonatomic, strong) NSString *message;
@property (nonatomic, readonly) BOOL success;
@property (nonatomic, readonly) BOOL noConnected;
@property (nonatomic, readonly, strong) NSDictionary *response;

+ (instancetype)resultWithAttributes:(NSDictionary *)attributes;
+ (instancetype)resultWithCode:(enum HttpResponseCode)code message:(NSString *)message;
+ (instancetype)resultWithNSError:(NSError *)error;

/** 判断该result是否token过期 */
- (BOOL)authTokenInvalid;

@end
